﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AEA.WPFControls.Test
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void Ade_Click(object sender, RoutedEventArgs e)
        {
            if (Ade.IsSourceEmpty)
            {
                Uri imagesource = new Uri("/AEA.WPFControls.Test;component/Butterfly.jpg", UriKind.Relative);
                Image test = new Image();
                BitmapImage image = new BitmapImage(imagesource);
                test.Source = image;
                Ade.Source = image;
            }
            else
            {
                Ade.Source = null;
            }
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("hello");
        }
    }
}
